package day07;


import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class DemoCode1 {
    public static void main(String[] args) {
        Collection<String> list = new ArrayList<>();
        ((ArrayList<String>) list).add("aa");
        ((ArrayList<String>) list).add("vb");
        ((ArrayList<String>) list).add("ac");
        ((ArrayList<String>) list).add("bb");
        ((ArrayList<String>) list).add("cc");
        ((ArrayList<String>) list).add("dd");
        ((ArrayList<String>) list).add("rr");
        ((ArrayList<String>) list).add("ee");
       /* for (String s : list) {
            System.out.println(s);*/
        Iterator<String> It = list.iterator();
        while (It.hasNext()){
            String next = It.next();
            System.out.println(next);
        }



    }
    }

